package whathappens;

import java.util.ArrayList;
import java.util.Calendar;

public class OneDayClass {

    private Calendar calendar = null;
    private ArrayList<EventClass> events = new ArrayList<EventClass>();

    public OneDayClass(Calendar calendar) {
        this.calendar = calendar;
    }

    public OneDayClass(EventClass event) {
        this.calendar = event.getEventDT();
        this.events.add(event);
    }

    public void addEvent(EventClass event) {
        events.add(event);
    }

    public Calendar getCalendar() {
        return calendar;
    }

    public Boolean hasSameDate(OneDayClass odc) {
        if (this.calendar.get(Calendar.DAY_OF_YEAR) == odc.calendar.get(Calendar.DAY_OF_YEAR)) {
            return true;
        } else {
            return false;
        }
    }

    public Boolean hasSameDate(Calendar calendar) {
        if (this.calendar.get(Calendar.DAY_OF_YEAR) == calendar.get(Calendar.DAY_OF_YEAR)) {
            return true;
        } else {
            return false;
        }
    }
    
    public Boolean hasNowDate() {
        if (this.calendar.get(Calendar.DAY_OF_YEAR) == Calendar.getInstance().get(Calendar.DAY_OF_YEAR)) {
            return true;
        } else {
            return false;
        }
    }
}
